package com.icss.clothes.service.imp;

import com.icss.clothes.entity.Type;
import com.icss.clothes.mapper.TypeMapper;
import com.icss.clothes.service.ITypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class TypeService implements ITypeService {
    @Autowired
    private TypeMapper typeMapper;
    @Override
    public List<Type> findAll() {
        //从数据库中查询得到所有商品类别
        return typeMapper.selectAll();
    }

    @Override
    public List<Type> findAllTypeByC_id(int c_id) {
        //从数据库中通过指定的商品编号查询得到所有商品类型
        return typeMapper.selectAllTypeByC_id(c_id);
    }
}
